/**
 * 
 */
package com.sci.web.action.datareportseason;

import java.util.ArrayList;
import java.util.List;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Menu;

/**
 * @author  BaiFuyou
 * @date: Nov 3, 2011 4:07:34 PM
 * 
 * 获取面板左边的树结构
 */
public class GetDataTreeAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8005927054811706604L;
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		/**
		 * 整体目录
		 */
		List<Menu> allmenus = new ArrayList<Menu>();
		/**
		 * 企业基本信息菜单
		 */
		List<Menu> enterprsise_base_info_list = new ArrayList<Menu>();
		/**
		 * 创新活动菜单
		 */
		List<Menu> enterprsise_innvocate_info_list = new ArrayList<Menu>();
		/**
		 * 创新活动近状
		 */
		List<Menu> enterprsise_innvocate_recent_list = new ArrayList<Menu>();
		/**
		 * 试点内容
		 */
		List<Menu> enterprsise_experimental_content_list = new ArrayList<Menu>();
		/**
		 * 企业上传扫描材料
		 */
		List<Menu> enterprsise_scan_material_list = new ArrayList<Menu>();
		
		/**
		 * 企业基本情况总目录树
		 */
		Menu enterprsise_base_info = new Menu("","企业基本情况",false,"","企业基本情况");
		Menu menu_base_info = new Menu("menu_base_info","基本信息",true,"treeLeaf","基本信息");
		Menu menu_enterprsise_reaearch_center = new Menu("menu_enterprsise_reaearch_center","企业研发机构",true,"treeLeaf","企业研发机构");
		Menu menu_enterprsise_tech_standard = new Menu("menu_enterprsise_tech_standard","制定技术标准",true,"treeLeaf","制定技术标准");
		Menu menu_technology_reward = new Menu("menu_technology_reward","企业科技奖励",true,"treeLeaf","企业科技奖励");
		Menu menu_state_local_project = new Menu("menu_state_local_project","国家和地方科技计划项目",true,"treeLeaf","国家和地方科技计划项目");
		Menu menu_quality_environment_authentication = new Menu("menu_quality_environment_authentication","质量体系环境保护认证",true,"treeLeaf","质量体系环境保护认证");
		enterprsise_base_info_list.add(menu_base_info);
		enterprsise_base_info_list.add(menu_enterprsise_reaearch_center);
		enterprsise_base_info_list.add(menu_enterprsise_tech_standard);
		enterprsise_base_info_list.add(menu_technology_reward);
		enterprsise_base_info_list.add(menu_state_local_project);
		enterprsise_base_info_list.add(menu_quality_environment_authentication);
		enterprsise_base_info.setChildren(enterprsise_base_info_list);
		/**
		 * 创新活动基本情况树
		 */
		Menu enterprsise_innvocate_info = new Menu("","创新活动基本情况",false,"","创新活动基本情况");
		Menu menu_research_money = new Menu("menu_research_money","研发经费投入强度",true,"treeLeaf","研发经费投入强度");
//		Menu menu_has_patent_case = new Menu("menu_has_patent_case","千名研发人员拥有的授权发明专利情况",true,"treeLeaf","千名研发人员拥有的授权发明专利情况");
//		Menu menu_new_product_costproportion = new Menu("menu_new_product_costproportion","新产品、新工艺、新服务销售收入占全部销售收入的比重",true,"treeLeaf","新产品、新工艺、新服务销售收入占全部销售收入的比重");
//		Menu menu_all_people_productivity = new Menu("menu_all_people_productivity","全员劳动生成率",true,"treeLeaf","全员劳动生成率");		
		enterprsise_innvocate_info_list.add(menu_research_money);
//		enterprsise_innvocate_info_list.add(menu_research_money);
//		enterprsise_innvocate_info_list.add(menu_new_product_costproportion);
//		enterprsise_innvocate_info_list.add(menu_all_people_productivity);
		enterprsise_innvocate_info.setChildren(enterprsise_innvocate_info_list);
		/**
		 * 创新活动进状树
		 * 
		 */
		Menu enterprsise_innvocate_recent = new Menu("","创新活动近状",false,"","创新活动近状");
		Menu menu_innovate_implements_case = new Menu("menu_innovate_implements_case","创新活动近状数据申报",true,"treeLeaf","创新活动近状数据申报");
//		Menu menu_innovate_management_case = new Menu("menu_innovate_management_case","创新管理与制度建设情况",true,"treeLeaf","创新管理与制度建设情况");
//		Menu menu_brand_make_case = new Menu("menu_brand_make_case","品牌塑造情况",true,"treeLeaf","品牌塑造情况");
//		Menu menu_innovate_culture_case = new Menu("menu_innovate_culture_case","创新文化建设情况",true,"treeLeaf","创新文化建设情况");
		enterprsise_innvocate_recent_list.add(menu_innovate_implements_case);
//		enterprsise_innvocate_recent_list.add(menu_innovate_management_case);
//		enterprsise_innvocate_recent_list.add(menu_brand_make_case);
//		enterprsise_innvocate_recent_list.add(menu_innovate_culture_case);
		enterprsise_innvocate_recent.setChildren(enterprsise_innvocate_recent_list);
		/**
		 * 试点内容树
		 */
		Menu enterprsise_experimental_content = new Menu("","试点内容",false,"","试点内容");
		Menu menu_experimental_type = new Menu("menu_experimental_type","试点内容",true,"treeLeaf","试点内容");
//		Menu menu_work_three_year = new Menu("menu_work_three_year","工作进度计划(三年)",true,"treeLeaf","工作进度计划(三年)");
		enterprsise_experimental_content_list.add(menu_experimental_type);
//		enterprsise_experimental_content_list.add(menu_work_three_year);
		enterprsise_experimental_content.setChildren(enterprsise_experimental_content_list);
		/**
		 * 上传扫描材料树
		 */
		Menu enterprsise_scan_material = new Menu("","扫描材料",false,"","扫描材料");
		Menu menu_scan_material = new Menu("menu_scan_material","上传的扫描材料",true,"treeLeaf","上传的扫描材料");
		enterprsise_scan_material_list.add(menu_scan_material);
		enterprsise_scan_material.setChildren(enterprsise_scan_material_list);
		/**
		 * 总菜单的加入树
		 */
		allmenus.add(enterprsise_base_info);
		allmenus.add(enterprsise_innvocate_info);
		allmenus.add(enterprsise_innvocate_recent);
//		allmenus.add(enterprsise_experimental_content);
		allmenus.add(enterprsise_scan_material);
		super.setContentType(super.JSON);
		String json = super.getJSONArrayString(allmenus);
		System.out.println(json);
		super.outPrint(json);
		return "json";
	}

}
